package com.candy.th1;

public class MyThread01 extends Thread{
    private MyThread02 th2;
    @Override
    public void run() {
        for (int i=0;i<10;i++) {
            try {
                System.out.println("黑龙:"+i);
                if(i==5) {
                    Thread.yield();
                }
            }catch (Exception e) {

            }
        }
    }

    public MyThread02 getTh2() {
        return th2;
    }

    public void setTh2(MyThread02 th2) {
        this.th2 = th2;
    }
}
